package vip.xiaomoli.validator.constraints;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import vip.xiaomoli.validator.validators.ExistsValidator;

import java.lang.annotation.*;

@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Constraint(validatedBy = ExistsValidator.class)
public @interface Exists {

    Class<?> apiClass();

    String methodName();

    String fieldName();

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

}
